From 1d439235ab5ff272fbfc859c19fd35356293e651 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Sun, 29 Apr 2018 14:50:36 -0600 Subject: [PATCH] syncrhonize config and run time version checks. --- configure | 1 + configure.ac | 1 + gui/main.cc | 3 ++- main.cc | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1ed361f69..4ae4d2c45 100755 --- a/configure +++ b/configure @@ -5783,6 +5783,7 @@ esac fi +# MIN_QT_VERSION in configure.ac should correspond to the QT_VERSION_CHECK arguments in main.cc and gui/main.cc MIN_QT_VERSION=5.7 if test "$QMAKE" = "no"; then : diff --git a/configure.ac b/configure.ac index 510804f0b..455c1db0d 100644 --- a/configure.ac +++ b/configure.ac @@ -166,6 +166,7 @@ AC_CHECK_TOOLS(QMAKE, [qmake-qt5 qmake], "no") AC_CHECK_TOOLS(LUPDATE, [lupdate-qt5 lupdate]) AC_CHECK_TOOLS(LRELEASE, [lrelease-qt5 lrelease]) +# MIN_QT_VERSION in configure.ac should correspond to the QT_VERSION_CHECK arguments in main.cc and gui/main.cc MIN_QT_VERSION=5.7 AS_IF([test "$QMAKE" = "no"], [ AC_MSG_ERROR([Qt qmake (with QT_VERSION >= $MIN_QT_VERSION) is required but was not found.]) diff --git a/gui/main.cc b/gui/main.cc index e9f991f92..5e605ab5c 100644 --- a/gui/main.cc +++ b/gui/main.cc @@ -44,7 +44,8 @@ const char *pathSeparator = ":"; //------------------------------------------------------------------------ int main(int argc, char**argv) { -#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 0)) +# MIN_QT_VERSION in configure.ac should correspond to the QT_VERSION_CHECK arguments in main.cc and gui/main.cc +#if (QT_VERSION < QT_VERSION_CHECK(5, 7, 0)) #error this version of Qt is not supported. #endif diff --git a/main.cc b/main.cc index 6874b2fe5..68b164a08 100644 --- a/main.cc +++ b/main.cc @@ -228,7 +228,8 @@ main(int argc, char* argv[]) (void) new gpsbabel::UsAsciiCodec(); /* make sure a US-ASCII codec is available */ -#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 0)) +# MIN_QT_VERSION in configure.ac should correspond to the QT_VERSION_CHECK arguments in main.cc and gui/main.cc +#if (QT_VERSION < QT_VERSION_CHECK(5, 7, 0)) #error This version of Qt is not supported. #endif -- 2.30.2